import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'
import Login from '@/views/Login'
import Layout from "@/layout/Layout"
import Settings from "@/views/Settings";
import PositionList from "@/views/PositionList";
import Resume from "@/views/Resume";
import MyResume from "@/views/MyResume";
import ProgressResume from "@/views/ProgressResume";
import Customer from '@/views/Customer';
import Home from "@/views/Home";
import Register from "@/views/Register";

const routes = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect:'/login',
    children:[
      {
        path: '/homeview',
        name: 'HomeView',
        component: HomeView
      },
      {
        path:'/home',
        name:'Home',
        component:Home
      },
      {
        path:'/positionList',
        name:PositionList,
        component: PositionList
      },
      {
        path:'/resume',
        name:Resume,
        component: Resume
      },
      {
        path:'/myResume',
        name:MyResume,
        component: MyResume
      },
      {
        path: '/progressResume',
        name:' ProgressResume',
        component: ProgressResume
      },
      {
        path: '/customer',
        name: 'Customer',
        component: Customer
      },
      {
        path: '/test',
        name: Home,
        component: Home
      },
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/register',
    name: 'Register',
    component: Register
  },
  {
    path: '/settings',
    name:'Person',
    component:Settings
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
